package util;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class FileHelper {

	public static void write(String fileName, InputStream in) throws IOException {

		OutputStream fout = new FileOutputStream(fileName);
		byte[] buf = new byte[4];
		int len = 0;
		while ((len = in.read(buf)) != -1) {
			fout.write(buf, 0, len);
		}
	}
}
